﻿import os
import sys
import platform

env = DefaultEnvironment().Clone()
BIN_DIR = os.environ['BIN_DIR']
LIB_DIR = os.environ['LIB_DIR'];

sources = Glob('**/*.c') + Glob('*.cpp') + ['api_doc.c']

APP_CXXFLAGS = ''
if platform.system() != 'Windows':
  APP_CXXFLAGS += ' -std=c++11 '

env.Library(os.path.join(LIB_DIR, 'api_doc'), sources)
libs = ['api_doc'] + env['LIBS']
env['CXXFLAGS'] = env['CXXFLAGS'] + APP_CXXFLAGS

env.Program(os.path.join(BIN_DIR, 'api_doc_lint'), ['main.c'], LIBS = libs)
